package com.code.day16.b_thread;

/*
* 同步代码块实现
* */

public class BaoZiPu {
    private int count;
    private boolean flag;

    public BaoZiPu(int count, boolean flag) {
        this.count = count;
        this.flag = flag;
    }

    public BaoZiPu() {
    }


    public void getCount() {
        System.out.println("消费了第" + count+ "个包子");
    }

    public void setCount() {
        count ++;
        System.out.println("包子铺正在做第" + count + "个包子");
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }
}
